package com.easy;

/**
 * Created by Lxk on 2020/2/23.
 */
public class Solution342 {

    public boolean isPowerOfFour(int num) {
        if (num <= 0) {
            return false;
        }
        while (true) {
            if (num == 1) {
                return true;
            }
            if (num % 4 == 0) {
                num = num >>> 2;
            } else {
                return false;
            }
        }
    }

}
